<!DOCTYPE html>
<html>
<?php
	session_start();
	include "db_function.php";
	$uid = intval($_SESSION['uid']);
	if($uid < 1){
		header("location: login.php");
		die;
	}
?>
	<head>

		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<link media="all" href="./css/one-debug.css" rel="stylesheet">
		<link media="all" href="css/main.css" type="text/css" rel="stylesheet"/>
		<script type=""text/javascript src="./js/jq/jquery-1.8.3.js"></script>
		<script type=""text/javascript src="./js/my.js"></script>
	</head>
	<body>
		<div class="wrapper">
			<div class="head-area">
				<h1>
					<a href="./index.php" class="head_area">GuoBa留言本</a>
				</h1>
				<span class="ctr-bar">
					欢迎: <?php echo $_SESSION['username']; ?>|<a href='logout.php'>退出</a>
				</span>
				<div class="clear"></div>
			</div>
	
			<div class="ui-nav ui-nav-nosub">
	  			<ul class="ui-nav-main">
		   			<li class="ui-nav-item">
		     			<a href="index.php">看帖</a>
	    			</li>
	    			<li class="ui-nav-item ui-nav-item-current">
		     			<a href="showpost.php">发帖</a>
	    			</li>
	    		</ul>
	    	</div>

	    	<div class="content">

				<form action="./postbackend.php" method="post" class="ui-form">
					<div class="ui-form-item">
						<label for="" class="ui-label">
	                			<span class="ui-form-required">*</span>帖子标题
	          			</label>
						<input type="text" name="title" class="ui-input"/>
					</div>
					<div class="ui-form-item">
						<label for="" class="ui-label">
	                			<span class="ui-form-required">*</span>帖子内容
	          			</label>
						<textarea name="content" cols="30" rows="20" class="ui-input"></textarea>
					</div>
					<div class="ui-form-item">
						<input type="submit" name="sub" value="发布主题帖" class="ui-input"/>
					</div>
				</form>
			</div>


		</div>
	</body>
</html>